<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Wednus Darwin</title>
<script type='text/javascript' src='../../../wednus_compact.js'></script>
<script type='text/javascript'>
W.module('darwin');
</script>

<script type='text/javascript'>
// define an oracle
var oracle = new W.Oracle();
// define world
var world = new W.World({
    cols: 6,
    rows: 6
});
world.showGrid(true);
world.delay = 7;
oracle.add(world);
oracle.showClock(true);

// define creatures
var gorgon = new W.Creature({
  speed: 4,
  uwidth: 4,
  uheight: 4,
  act: 'walk'
});


// add skills
gorgon.add(new W.Skill({name: 'walk', img: 'module/darwin/test/image/gorgon/walk.gif',
  north: '0:0,0:96,0:192',
  east:  '96:0,96:96,96:192',
  south: '192:0,192:96,192:192',
  west:  '288:0,288:96,288:192'
}));

// define the creature algorithm
gorgon.algo = function(event, arg){
  switch(event){
    case 'on_wall':
      this.does(this.skills['walk'], 'left');
      break;
  };
};

// add creatures
world.add(gorgon);
</script>
</head>
<body style='background:black'>
</body></html>